package cn.edu.zjicm.wordsnet_d.pay;

import android.database.Cursor;

public class Product {

	private String product_name;
	private int product_type; // 0：充值，购买知米豆；1：购买单词书
	private int price; // productType为0时，单位为元(rmb)；productType为1时，单位为知米豆
	private int id; // productType为0时，无意义；productType为1时，id为单词书的BOOK_INDEX，见AppPreference.Book.BOOK_INDEX

	public Product(String product_name, int product_type, int price, int id) {
		super();
		this.product_name = product_name;
		this.product_type = product_type;
		this.price = price;
		this.id = id;
	}

	public Product(Cursor c) {
		this(c.getString(0), c.getInt(1), c.getInt(2), c.getInt(3));
	}

	public String getProductName() {
		return product_name;
	}

	public void setProductName(String product_name) {
		this.product_name = product_name;
	}

	public int getProductType() {
		return product_type;
	}

	public void setProductType(int product_type) {
		this.product_type = product_type;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

}
